#include <stdio.h>

int main(void){
    int month;
    scanf("%d", &month);

    if(month >= 1 && month <= 3) printf("111\n");
    else if(month >= 4 && month <= 6) printf("222\n");
    else if(month >= 7 && month <= 9) printf("333\n");
    else printf("444\n");

    return 0;
}
